#define _CRT_SECURE_NO_WARNINGS 1

#include"Sort.h"


void InsortSortTest()
{
	int a[6] = { 3,6,11,5,12,1 };
	InsertSort(a, sizeof(a) / sizeof(a[0]));
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}
void ShellSortest()
{
	int a[6] = { 3,6,11,5,12,1 };
	ShellSort(a, 6);
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}
void test1()
{
	int a[6] = { 3,6,11,5,12,1 };
	SelectSort(a, 6);
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}

void QuickSorttest()
{
	int a[6] = { 3,6,11,5,12,1 };
	QuickSort(a, 0,5);
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}

void GetMidTest()
{
	int a[3] = { 4,3,5 };
	int mid = GetMidIndex(a, 0, sizeof(a) / sizeof(a[0]) - 1);
	printf("%d ", a[mid]);
}


void QuickSortNonRtest()
{
	int a[6] = { 3,6,11,5,12,1 };
	QuickSortNonR(a, 0, 5);
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}

void MergeSortTest( )
{
	int a[6] = { 3,6,11,5,12,1 };
	MergeSort(a, 6);
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}
void MergeSortNonRTest()
{
	int a[6] = { 3,6,11,5,12,1 };
	MergeSortNonR(a, 6);
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}
void CountSortTest()
{
	int a[6] = { 3,6,11,5,12,1 };
	CountSort(a, 6);
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}
int main()
{
	
	ShellSortest();
	return 0;
}